
<h1><span class="yiyi-st" id="yiyi-12">numpy.testing.assert_raises_regex</span></h1>
        <blockquote>
        <p>原文：<a href="https://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.assert_raises_regex.html">https://docs.scipy.org/doc/numpy/reference/generated/numpy.testing.assert_raises_regex.html</a></p>
        <p>译者：<a href="https://github.com/wizardforcel">飞龙</a> <a href="http://usyiyi.cn/">UsyiyiCN</a></p>
        <p>校对：（虚位以待）</p>
        </blockquote>
    
<dl class="function">
<dt id="numpy.testing.assert_raises_regex"><span class="yiyi-st" id="yiyi-13"> <code class="descclassname">numpy.testing.</code><code class="descname">assert_raises_regex</code><span class="sig-paren">(</span><em>exception_class</em>, <em>expected_regexp</em>, <em>callable_obj=None</em>, <em>*args</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="reference external" href="http://github.com/numpy/numpy/blob/v1.11.3/numpy/testing/utils.py#L1148-L1221"><span class="viewcode-link">[source]</span></a></span></dt>
<dd><p><span class="yiyi-st" id="yiyi-14">失败，除非在使用参数args和关键字参数kwargs调用时，callable抛出类exception_class和与expected_regexp匹配的消息的异常。</span></p>
<p><span class="yiyi-st" id="yiyi-15">此函数的名称遵循Python 3.2+引用，但应适用于所有版本至2.6。</span></p>
</dd></dl>
